package com.czkevin.biliwsclient.gift;

import com.alibaba.fastjson.JSONObject;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;

@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class GuardInfo {

    public final int level;
    public final String name;

    public static GuardInfo decode(JSONObject g) {
        return new GuardInfo(
            g.getIntValue("level"),
            g.getString("name")
        );
    }

}
